package net.message {

	import flash.utils.IDataInput;
	
	import net.MessageType;
	import net.handler.UserHandler;

	public class GCUserMessage extends BaseMessage {
		
		public var username:String;
		public var userId:String;
		public var chargeNum:uint;
		public var chargeTotal:uint;
		public var vipLevel:uint;
		public var gold:int;
		public var silver:int;
		public var exploit:int;
		public var level:uint;
		public var exp:int;
		public var mapId:uint;
		public var waveId:uint;
		public var order:uint;

		public function GCUserMessage() {
			super();
			type = MessageType.GC_USER_INFO;
			handler = new UserHandler();
		}
		
		override public function readMessage(data:IDataInput):void {
			var t:String = readLong(data);
			userId = readLong(data);
			username = readString(data);
			chargeNum = data.readShort();
			chargeTotal = data.readInt();
			vipLevel = data.readShort();
			gold = data.readInt();
			silver = data.readInt();
			exploit = data.readInt();
			level = data.readShort();
			exp = data.readInt();
			mapId = data.readShort();
			waveId = data.readShort();
			order = data.readShort();
		}
	}
}